/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package carreras.entidades;

/**
 *
 * @author fanky10
 */
public class Autos extends java.util.ArrayList<Auto> {

    public Autos getAutosPatente(String pat){
        if(pat == null || pat.isEmpty()){
            return this;
        }
        Autos carS = new Autos();
        for(Auto a: this){
            if(a.getPatente().toLowerCase().contains(pat)){
                carS.add(a);
            }
        }
        return carS;
    }
    
}
